
close all
clc

%% Storage Modulus
% Import excel data

mfCMP_0percent;
mfCMP_25percent;
mfCMP_50percent;


%T = table2array(Modulus)

Modulus_change = zeros(4,3);
Modulus_change(:,1) = mfCMP_0percent; % 0mM CMP
Modulus_change(:,2) = mfCMP_25percent; % 0mM CMP
Modulus_change(:,3) = mfCMP_50percent % 0mM CMP

[p_modulus tbl_modulus stats_modulus] = anova1(Modulus_change) % where T is a matrix with data columns
modulus_change_comparison = multcompare(stats_modulus) % multiple comparisons test

%% All comparisons
% % Import excel data
% T1 = readtable('LiveDead.xlsx');
% T = table2array(T1);
% CMP = {'RGD','RGD','RGD','RGD','RGD','RGD','RGD','RGD','RGD','Low','Low','Low','Low','Low','Low','Low','Low','Low','High','High','High','High','High','High','High','High','High','RGD','RGD','RGD','RGD','Low','Low','Low','Low','High','High','High','High'};
% Dialysis = {'ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','ND','D','D','D','D','D','D','D','D','D','D','D','D'};
% 
% % Assign datasets
% RGD_ND = T(:,1)';
% Low_ND = T(:,2)';
% High_ND = T(:,3)';
% RGD_D = T((1:4),4)';
% Low_D = T((1:4),5)';
% High_D = T((1:4),6)';
% 
% 
% y = [RGD_ND, Low_ND, High_ND, RGD_D, Low_D, High_D];
% [p tbl stats] = anovan(y,{CMP,Dialysis},'model','interaction','varnames',{'CMP','Dialysis'}) % where T is a matrix with data columns
% comparison = multcompare(stats) % multiple comparisons test